package com.sinodata.bsm.common.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * ResAttrValHis entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "RES_ATTR_VAL_HIS")
public class ResAttrValHis implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 4743237941666850666L;

    // Fields   
    private Long id;
    private Long resId;
    private Long attrId;
    private String attrValue;
    private Date time;

    // Constructors

    /** default constructor */
    public ResAttrValHis() {
    }

    /** minimal constructor */
    public ResAttrValHis(Long id) {
        this.id = id;
    }

    /** full constructor */
    public ResAttrValHis(Long id, Long resId, Long attrId, String attrValue, Date time) {
        this.id = id;
        this.resId = resId;
        this.attrId = attrId;
        this.attrValue = attrValue;
        this.time = time;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "RES_ATTR_VAL_HIS_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "ATTR_ID", precision = 18, scale = 0)
    public Long getAttrId() {
        return this.attrId;
    }

    public void setAttrId(Long attrId) {
        this.attrId = attrId;
    }

    @Column(name = "ATTR_VALUE", length = 2048)
    public String getAttrValue() {
        return this.attrValue;
    }

    public void setAttrValue(String attrValue) {
        this.attrValue = attrValue;
    }

    @Column(name = "TIME", length = 7)
    public Date getTime() {
        return this.time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "ResAttrValHis [id=" + id + ", resId=" + resId + ", attrId=" + attrId + ", attrValue=" + attrValue + ", time=" + time + "]";
    }

}